class Pharmacy < Location
  
  def process(message)
    case message
    when Prescription
      deal_with_prescription(message)
    when PrescriptionPickup
      # all done
    else
      super
    end
  end  
  
  def deal_with_prescription(message)
    @blocked = true
    # needs to take between 1 and 5 minutes to process prescription
    future_message(PrescriptionPickup.new(message),service_time(5))
  end
  
end